import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import svgIcon from '@/components/SvgIcon/index.vue'

import 'amfe-flexible/index.js'
import './assets/styles/index.scss'

//全局引入，全部引入
//import vant from 'vant'
import 'vant/lib/index.css'
//桌面用mouse事件转换成touch事件。
import '@vant/touch-emulator'

import './permission'
import directive from './directive'
import 'animate.css/animate.min.css' //引入

// import { Image as VanImage,Button, Uploader,Form, Field, CellGroup } from "vant";
// import { AddressEdit, AddressList } from 'vant';
// app.use(Button);
// app.use(VanImage);
// app.use(Form);
// app.use(Field);
// app.use(CellGroup);
// app.use(Uploader);
// app.use(AddressEdit);
// Toast

//函数式的几个插件及其样式，要在这里引入。
import { showToast } from 'vant'
import 'vant/es/toast/style'
// Dialog
import { showDialog } from 'vant'
import 'vant/es/dialog/style'
// Notify
import { showNotify } from 'vant'
import 'vant/es/notify/style'
// ImagePreview
import { showImagePreview } from 'vant'
import 'vant/es/image-preview/style'

const app = createApp(App)

app.use(createPinia())
app.use(router)

//app.use(vant) //全局引入，全部引入
// app.use(showToast);
// app.use(showDialog);

directive(app)

app.component('svg-icon', svgIcon)

app.mount('#app')
